

extends "../cex___toolman/cex___toolman.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "修女"
	camp = "牧师"
	lv = 1
	attCoe.atkRan = 3
	attCoe.atk = 20 / 8.5 * 2
	attCoe.maxHp = 400 / 112.5
	attAdd.spd += 1.0
	atkEff = "atk_dang"
	addSkillTxt("牧师精通：普攻伤害50%转为治疗生命比最低的我方角色")
var sc = 0.5
func _onAtkChara(atkinfo):
	if !atkinfo.isMiss && atkinfo.atkType == Chara.AtkType.NORMAL:
		var chas = getAllChas(2)
		chas.sort_custom(self,"sort")
		if !chas.size():return
		healCha(chas[0],atkinfo.hurtVal * sc)
		atkinfo.hurtVal *= (1 - sc)
	._onAtkChara(atkinfo)

func sort(a,b):
	return (a.att.hp / a.att.maxHp) < (b.att.hp / b.att.maxHp)
